home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / bitmap / colorset.frm < prev    next >
Text File  |  1995-05-08  |  10KB  |  333 lines

  1. VERSION 2.00
  2. Begin Form ColorSetForm 
  3.    Caption         =   "Color Settings"
  4.    ClientHeight    =   990
  5.    ClientLeft      =   195
  6.    ClientTop       =   6075
  7.    ClientWidth     =   9120
  8.    Height          =   1395
  9.    Left            =   135
  10.    LinkMode        =   1  'Source
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   990
  13.    ScaleWidth      =   9120
  14.    Top             =   5730
  15.    Width           =   9240
  16.    Begin HScrollBar BGScrl 
  17.       Height          =   315
  18.       Index           =   2
  19.       LargeChange     =   16
  20.       Left            =   4320
  21.       Max             =   255
  22.       TabIndex        =   7
  23.       Top             =   660
  24.       Width           =   1575
  25.    End
  26.    Begin HScrollBar FGScrl 
  27.       Height          =   315
  28.       Index           =   2
  29.       LargeChange     =   16
  30.       Left            =   300
  31.       Max             =   255
  32.       TabIndex        =   15
  33.       Top             =   660
  34.       Width           =   1575
  35.    End
  36.    Begin CommandButton Cancel 
  37.       Cancel          =   -1  'True
  38.       Caption         =   "Cancel"
  39.       Height          =   375
  40.       Left            =   8040
  41.       TabIndex        =   17
  42.       Top             =   540
  43.       Width           =   1035
  44.    End
  45.    Begin HScrollBar BGScrl 
  46.       Height          =   315
  47.       Index           =   1
  48.       LargeChange     =   16
  49.       Left            =   4320
  50.       Max             =   255
  51.       TabIndex        =   5
  52.       Top             =   360
  53.       Width           =   1575
  54.    End
  55.    Begin HScrollBar FGScrl 
  56.       Height          =   315
  57.       Index           =   1
  58.       LargeChange     =   16
  59.       Left            =   300
  60.       Max             =   255
  61.       TabIndex        =   13
  62.       Top             =   360
  63.       Width           =   1575
  64.    End
  65.    Begin CommandButton Apply 
  66.       Caption         =   "Apply"
  67.       Default         =   -1  'True
  68.       Height          =   375
  69.       Left            =   8040
  70.       TabIndex        =   16
  71.       Top             =   60
  72.       Width           =   1035
  73.    End
  74.    Begin PictureBox BG 
  75.       Height          =   915
  76.       Left            =   5940
  77.       ScaleHeight     =   885
  78.       ScaleWidth      =   1665
  79.       TabIndex        =   2
  80.       Top             =   60
  81.       Width           =   1695
  82.    End
  83.    Begin HScrollBar BGScrl 
  84.       Height          =   315
  85.       Index           =   0
  86.       LargeChange     =   16
  87.       Left            =   4320
  88.       Max             =   255
  89.       TabIndex        =   1
  90.       Top             =   60
  91.       Width           =   1575
  92.    End
  93.    Begin PictureBox FG 
  94.       Height          =   915
  95.       Left            =   1920
  96.       ScaleHeight     =   885
  97.       ScaleWidth      =   1665
  98.       TabIndex        =   10
  99.       Top             =   60
  100.       Width           =   1695
  101.    End
  102.    Begin HScrollBar FGScrl 
  103.       Height          =   315
  104.       Index           =   0
  105.       LargeChange     =   16
  106.       Left            =   300
  107.       Max             =   255
  108.       TabIndex        =   9
  109.       Top             =   60
  110.       Width           =   1575
  111.    End
  112.    Begin Label BGText 
  113.       Alignment       =   2  'Center
  114.       BackColor       =   &H00FF0000&
  115.       Caption         =   "B"
  116.       FontBold        =   -1  'True
  117.       FontItalic      =   0   'False
  118.       FontName        =   "MS Sans Serif"
  119.       FontSize        =   9.75
  120.       FontStrikethru  =   0   'False
  121.       FontUnderline   =   0   'False
  122.       ForeColor       =   &H00FFFFFF&
  123.       Height          =   315
  124.       Index           =   2
  125.       Left            =   4080
  126.       TabIndex        =   6
  127.       Top             =   660
  128.       Width           =   255
  129.    End
  130.    Begin Label FGText 
  131.       Alignment       =   2  'Center
  132.       BackColor       =   &H00FF0000&
  133.       Caption         =   "B"
  134.       FontBold        =   -1  'True
  135.       FontItalic      =   0   'False
  136.       FontName        =   "MS Sans Serif"
  137.       FontSize        =   9.75
  138.       FontStrikethru  =   0   'False
  139.       FontUnderline   =   0   'False
  140.       ForeColor       =   &H00FFFFFF&
  141.       Height          =   315
  142.       Index           =   2
  143.       Left            =   60
  144.       TabIndex        =   14
  145.       Top             =   660
  146.       Width           =   255
  147.    End
  148.    Begin Label ColorSetText 
  149.       Alignment       =   2  'Center
  150.       Caption         =   "BG"
  151.       Height          =   255
  152.       Index           =   3
  153.       Left            =   7680
  154.       TabIndex        =   0
  155.       Top             =   360
  156.       Width           =   315
  157.    End
  158.    Begin Label BGText 
  159.       Alignment       =   2  'Center
  160.       BackColor       =   &H0000FF00&
  161.       Caption         =   "G"
  162.       FontBold        =   -1  'True
  163.       FontItalic      =   0   'False
  164.       FontName        =   "MS Sans Serif"
  165.       FontSize        =   9.75
  166.       FontStrikethru  =   0   'False
  167.       FontUnderline   =   0   'False
  168.       ForeColor       =   &H00FFFFFF&
  169.       Height          =   315
  170.       Index           =   1
  171.       Left            =   4080
  172.       TabIndex        =   4
  173.       Top             =   360
  174.       Width           =   255
  175.    End
  176.    Begin Label ColorSetText 
  177.       Alignment       =   2  'Center
  178.       Caption         =   "FG"
  179.       Height          =   255
  180.       Index           =   7
  181.       Left            =   3660
  182.       TabIndex        =   8
  183.       Top             =   360
  184.       Width           =   375
  185.    End
  186.    Begin Label FGText 
  187.       Alignment       =   2  'Center
  188.       BackColor       =   &H0000FF00&
  189.       Caption         =   "G"
  190.       FontBold        =   -1  'True
  191.       FontItalic      =   0   'False
  192.       FontName        =   "MS Sans Serif"
  193.       FontSize        =   9.75
  194.       FontStrikethru  =   0   'False
  195.       FontUnderline   =   0   'False
  196.       ForeColor       =   &H00FFFFFF&
  197.       Height          =   315
  198.       Index           =   1
  199.       Left            =   60
  200.       TabIndex        =   12
  201.       Top             =   360
  202.       Width           =   255
  203.    End
  204.    Begin Label BGText 
  205.       Alignment       =   2  'Center
  206.       BackColor       =   &H000000FF&
  207.       Caption         =   "R"
  208.       FontBold        =   -1  'True
  209.       FontItalic      =   0   'False
  210.       FontName        =   "MS Sans Serif"
  211.       FontSize        =   9.75
  212.       FontStrikethru  =   0   'False
  213.       FontUnderline   =   0   'False
  214.       ForeColor       =   &H00FFFFFF&
  215.       Height          =   315
  216.       Index           =   0
  217.       Left            =   4080
  218.       TabIndex        =   3
  219.       Top             =   60
  220.       Width           =   255
  221.    End
  222.    Begin Label FGText 
  223.       Alignment       =   2  'Center
  224.       BackColor       =   &H000000FF&
  225.       Caption         =   "R"
  226.       FontBold        =   -1  'True
  227.       FontItalic      =   0   'False
  228.       FontName        =   "MS Sans Serif"
  229.       FontSize        =   9.75
  230.       FontStrikethru  =   0   'False
  231.       FontUnderline   =   0   'False
  232.       ForeColor       =   &H00FFFFFF&
  233.       Height          =   315
  234.       Index           =   0
  235.       Left            =   60
  236.       TabIndex        =   11
  237.       Top             =   60
  238.       Width           =   255
  239.    End
  240. End
  241. Dim DefaultFG As Long, DefaultBG As Long
  242. '-- indicates that the form is initialized, used in Form_Resize
  243. '   see the BGScrl_Change (or FGScrl_Change) events for the reason this is needed
  244. Dim FormInit As Integer
  245.  
  246. Sub Apply_Click ()
  247.  
  248. Hide
  249.  
  250. End Sub
  251.  
  252. Sub BGScrl_Change (Index As Integer)
  253.  
  254. '-- Index has a range from 0 to 2
  255. BGText(Index).BackColor = BGScrl(Index).Value * &H100 ^ Index
  256.  
  257. '-- if the form is initializing (in the Resize event), don't change the
  258. '   backcolor because otherwise we'll only get the first value (Red) correct
  259. '   the reason for this is the first time this is called, we just set the
  260. '   0th Scrl value, values 1 and 2 haven't been set, but when we execute
  261. '   the next statement, it'll reset the BackColor which the Form_Resize event
  262. '   uses to set the Scrl values themselves!
  263. If Not FormInit Then
  264.     BG.BackColor = RGB(BGScrl(0).Value, BGScrl(1).Value, BGScrl(2).Value)
  265. End